<?php 
class Application_Model_ReaderConfig extends Application_Model_DomainObject{
    
    protected $_id;
    
    protected $_name;
    
    protected $_url;
    
    protected $_className;
    
    protected $_description;
    
    protected $_productNameRegex;
    
    protected $_imageRegex;
    
    protected $_skuRegex;
    
    protected $_priceRegex;
    
    protected $_descriptionRegex;
    
    protected $_shipFeeRegex;
    
    protected $_allSkuRegex;
    
    protected $_shopRegex;


    /**
     * 返回数据库操作类
     * @return \Application_Model_DbTable_ReaderConfig 
     */
    private static function getDb(){
        return new Application_Model_DbTable_ReaderConfig();
    }

    /**
     * 返回指定站点的配置
     * @param string $url
     * @return \Application_Model_ReaderConfig 
     */
    public static function getBySite($url){
        return Application_Model_ReaderConfig::getDb()->queryOne(array('url'=>$url));
    }
}